import React from 'react';
import { Button, Card } from 'antd';
import Result from '../../components/Result';

export default class Success extends React.PureComponent {
  handleIndex = () => {
    const { history } = this.props;
    history.push('/');
  };

  render() {
    return (
      <Card bordered={false}>
        <Result
          type="success"
          title="发布成功"
          actions={
            <Button type="primary" onClick={this.handleIndex}>
              确定
            </Button>
          }
          style={{ marginTop: 48, marginBottom: 16 }}
        />
      </Card>
    );
  }
}
